import BaseCustom from '@main/entities/service/admin/base/base-custom.entity';
import BaseMachine from '@main/entities/service/admin/base/base-machine.entity';
import BaseMaterial from '@main/entities/service/admin/base/base-material.entity';
import BaseShift from '@main/entities/service/admin/base/base-shift.entity';
import BaseWorkType from '@main/entities/service/admin/base/base-work-type.entity';
import BaseColor from '@main/entities/service/admin/base/base-color.entity';
import { Module, forwardRef } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { BaseCustomController } from './custom/custom.controller';
import { BaseMachineController } from './machine/machine.controller';
import { BaseMaterialController } from './material/material.controller';
import { BaseShiftController } from './shift/shift.controller';
import { BaseWorkTypeController } from './workType/workType.controller';
import { BaseColorController } from './color/color.controller';
import { BaseCustomService } from './custom/custom.service';
import { BaseMachineService } from './machine/machine.service';
import { BaseMaterialService } from './material/material.service';
import { BaseShiftService } from './shift/shift.service';
import { BaseWorkTypeService } from './workType/workType.service';
import { BaseColorService } from './color/color.service';
import BaseShiftUser from '@main/entities/service/admin/base/base-shift-user.entity';
import { SystemModule } from '../system/system.module';
import BaseMaterialMachineParameter from '@main/entities/service/admin/base/base-materia-machine-parameter.entity';
import BaseMaterialMachineParameterUnit from '@main/entities/service/admin/base/base-materia-machine-parameter-unit.entity';
import BasePlate from '@main/entities/service/admin/base/base-plate.entity';
import { BasePlateController } from './plate/plate.controller';
import { BasePlateService } from './plate/plate.service';
import BaseAlarm from '@main/entities/service/admin/base/base-alarm.entity';
import BaseBad from '@main/entities/service/admin/base/base-bad.entity';
import BaseShutdownReason from '@main/entities/service/admin/base/base-shutdown-reason.entity';
import { BaseAlarmController } from './alarm/alarm.controller';
import { BaseBadController } from './bad/bad.controller';
import { BaseShutdownReasonController } from './shutdownReason/shutdownReason.controller';
import { BaseAlarmService } from './alarm/alarm.service';
import { BaseBadService } from './bad/bad.service';
import { BaseShutdownReasonService } from './shutdownReason/shutdownReason.service';
import BaseMaintainProject from '@main/entities/service/admin/base/base-maintain-project.entity';
import { BaseMaintainProjectController } from './maintainProject/maintainProject.controller';
import { BaseMaintainProjectService } from './maintainProject/maintainProject.service';
import BaseMachineMaintainProject from '@main/entities/service/admin/base/base-machine-maintain-project.entity';
import BaseMachineMaintainProjectList from '@main/entities/service/admin/base/base-machine-maintain-project-list.entity';
import { BaseMachineMaintainProjectController } from './machineMaintainProject/machineMaintainProject.controller';
import { BaseMachineMaintainProjectService } from './machineMaintainProject/machineMaintainProject.service';
import WipMachineMaintain from '@main/entities/service/admin/wip/wip-machine-maintain.entity';
import { WipModule } from '../wip/wip.module';
import BaseKnife from '@main/entities/service/admin/base/base-knife.entity';
import { BaseKnifeController } from './knife/knife.controller';
import { BaseKnifeService } from './knife/knife.service';

@Module({
  imports: [
    forwardRef(() => WipModule),
    SystemModule,
    TypeOrmModule.forFeature([
      BaseCustom,
      BaseMachine,
      BaseShift,
      BaseWorkType,
      BaseMaterial,
      BaseShiftUser,
      BaseMaterialMachineParameter,
      BaseMaterialMachineParameterUnit,
      BaseColor,
      BasePlate,
      BaseAlarm,
      BaseBad,
      BaseShutdownReason,
      BaseMaintainProject,
      BaseMachineMaintainProject,
      BaseMachineMaintainProjectList,
      WipMachineMaintain,
      BaseKnife
    ]),
  ],
  controllers: [
    BaseCustomController,
    BaseMachineController,
    BaseMaterialController,
    BaseShiftController,
    BaseWorkTypeController,
    BaseColorController,
    BasePlateController,
    BaseAlarmController,
    BaseBadController,
    BaseShutdownReasonController,
    BaseMaintainProjectController,
    BaseMachineMaintainProjectController,
    BaseKnifeController
  ],
  providers: [
    BaseCustomService,
    BaseMachineService,
    BaseMaterialService,
    BaseShiftService,
    BaseWorkTypeService,
    BaseColorService,
    BasePlateService,
    BaseAlarmService,
    BaseBadService,
    BaseShutdownReasonService,
    BaseMaintainProjectService,
    BaseMachineMaintainProjectService,
    BaseKnifeService
  ],
  exports: [
    TypeOrmModule,
    BaseMachineService,
    BaseMaterialService,
    BaseShiftService,
    BaseCustomService,
    BaseColorService,
    BaseShutdownReasonService,
    BaseBadService,
    BaseMachineMaintainProjectService,
  ],
})

export class BaseModule {}
